import request from '@/util/request'
import { login, sigin, forgot } from '@/constants/requestURL'


//登录请求
export function loginRequest(username, password, code) {
    const data = {username : '', password:'', code:''}
    data.username=username;
    data.password=password;
    data.code =code;
    // console.log(username + '  ' + password + '  ' + code);
    return request({
        url: login,
        method: 'get',
        params: data

    })
}

//注册请求
export function siginRequest(data) {
    return request({
        url: sigin,
        method: 'post',
        data

    })
}

//忘记密码
export function outLoginRequest(data) {
    return request({
        url: forgot,
        method: 'get',
        data

    })
}